package com.nuoniu.sibanyun.entity.erp;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.nuoniu.sibanyun.common.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author 白强
 * @since 2021-01-23
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("erp_customer")
@ApiModel(value="ErpCustomer对象", description="")
public class ErpCustomer extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "租户id")
    @TableField("company_id")
    private Integer companyId;

    @ApiModelProperty(value = "账套ID")
    @TableField("account_id")
    private Integer accountId;

    @ApiModelProperty(value = "往来单位分类ID（客户分类ID）")
    @TableField("partner_class_id")
    private Integer partnerClassId;

    @ApiModelProperty(value = "客户编码")
    @TableField("customer_code")
    private String customerCode;

    @ApiModelProperty(value = "客户名称")
    @TableField("customer_name")
    private String customerName;

    @ApiModelProperty(value = "客户简称")
    @TableField("customer_abb_name")
    private String customerAbbName;

    @ApiModelProperty(value = "往来单位 社会统一代码")
    @TableField("company_number")
    private String companyNumber;

    @ApiModelProperty(value = "客户拼音码")
    @TableField("customer_pym")
    private String customerPym;

    @ApiModelProperty(value = "行业编码")
    @TableField("industry_code")
    private String industryCode;

    @ApiModelProperty(value = "行业名称")
    @TableField("industry_name")
    private String industryName;

    @ApiModelProperty(value = "地区编码")
    @TableField("area_code")
    private String areaCode;

    @ApiModelProperty(value = "地区全称")
    @TableField("area_name")
    private String areaName;

    @ApiModelProperty(value = "纳税性质(一般纳税人/小规模税人)")
    @TableField("tax_nature")
    private String taxNature;

    @ApiModelProperty(value = "税率")
    @TableField("tax_rate")
    private BigDecimal taxRate;

    @ApiModelProperty(value = "法人")
    @TableField("legal_person")
    private String legalPerson;

    @ApiModelProperty(value = "风险等级")
    @TableField("risk_level")
    private String riskLevel;

    @ApiModelProperty(value = "是否控制信用")
    @TableField("is_credit")
    private Boolean isCredit;

    @ApiModelProperty(value = "是否控制信用期限")
    @TableField("is_credit_date")
    private Boolean isCreditDate;

    @ApiModelProperty(value = "信用等级")
    @TableField("credit_grade")
    private String creditGrade;

    @ApiModelProperty(value = "信用额度")
    @TableField("credit_limit")
    private BigDecimal creditLimit;

    @ApiModelProperty(value = "信用期限")
    @TableField("credit_date")
    private LocalDate creditDate;

    @ApiModelProperty(value = "经营许可证是否期限管理")
    @TableField("is_business_date")
    private Boolean isBusinessDate;

    @ApiModelProperty(value = "经营许可证到期日期")
    @TableField("business_end_date")
    private LocalDate businessEndDate;

    @ApiModelProperty(value = "经营许可证生效日")
    @TableField("business_start_date")
    private LocalDate businessStartDate;

    @ApiModelProperty(value = "经营许可证预警天数")
    @TableField("business_advance_day")
    private Integer businessAdvanceDay;

    @ApiModelProperty(value = "是否成交")
    @TableField("is_deal")
    private Boolean isDeal;

    @ApiModelProperty(value = "是否限销")
    @TableField("is_limit_sale")
    private Boolean isLimitSale;

    @ApiModelProperty(value = "开户银行")
    @TableField("bank")
    private String bank;

    @ApiModelProperty(value = "银行账户")
    @TableField("bank_account")
    private String bankAccount;

    @ApiModelProperty(value = "所属银行编码")
    @TableField("bank_code")
    private String bankCode;

    @ApiModelProperty(value = "地址")
    @TableField("address")
    private String address;

    @ApiModelProperty(value = "对应供应商")
    @TableField("rel_vendor")
    private String relVendor;

    @ApiModelProperty(value = "客户付款条件")
    @TableField("pay_condition")
    private String payCondition;

    @ApiModelProperty(value = "佣金比率(%)")
    @TableField("commision_rate")
    private BigDecimal commisionRate;

    @ApiModelProperty(value = "保险费率(%)")
    @TableField("insue_rate")
    private BigDecimal insueRate;

    @ApiModelProperty(value = "价格级别")
    @TableField("cost_grade")
    private Integer costGrade;

    @ApiModelProperty(value = "折扣率")
    @TableField("discount_rate")
    private BigDecimal discountRate;

    @ApiModelProperty(value = "使用频率")
    @TableField("frequency")
    private Integer frequency;

    @ApiModelProperty(value = "最后交易金额")
    @TableField("last_money")
    private BigDecimal lastMoney;

    @ApiModelProperty(value = "最后交易日期")
    @TableField("last_date")
    private LocalDate lastDate;

    @ApiModelProperty(value = "最后收款金额")
    @TableField("last_receive_money")
    private BigDecimal lastReceiveMoney;

    @ApiModelProperty(value = "最后收款日期")
    @TableField("last_receive_date")
    private LocalDate lastReceiveDate;

    @ApiModelProperty(value = "应收余额")
    @TableField("should_receive_money")
    private BigDecimal shouldReceiveMoney;

    @ApiModelProperty(value = "电子发票接收邮件")
    @TableField("electronic_receive_mail")
    private String electronicReceiveMail;

    @ApiModelProperty(value = "电子发票接收手机")
    @TableField("electronic_receive_phone")
    private String electronicReceivePhone;

    @ApiModelProperty(value = "租户分管部门ID")
    @TableField("charge_office_id")
    private Integer chargeOfficeId;

    @ApiModelProperty(value = "租户分管部门")
    @TableField("charge_office_name")
    private String chargeOfficeName;

    @ApiModelProperty(value = "租户分管人员ID")
    @TableField("charge_user_id")
    private Integer chargeUserId;

    @ApiModelProperty(value = "租户分管人员")
    @TableField("charge_user_name")
    private String chargeUserName;

    @ApiModelProperty(value = "描述")
    @TableField("remarks")
    private String remarks;

    @ApiModelProperty(value = "创建人id")
    @TableField("create_user_id")
    private Integer createUserId;

    @ApiModelProperty(value = "创建人")
    @TableField("create_user_name")
    private String createUserName;

    @ApiModelProperty(value = "修改人id")
    @TableField("update_user_id")
    private Integer updateUserId;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_date")
    private LocalDateTime createDate;

    @ApiModelProperty(value = "修改人")
    @TableField("update_user_name")
    private String updateUserName;

    @ApiModelProperty(value = "修改时间")
    @TableField("update_date")
    private LocalDateTime updateDate;

    @ApiModelProperty(value = "状态(0:正常 1:删除 2：停用)")
    @TableField("status")
    private Integer status;


}
